home *** CD-ROM | disk | FTP | other *** search
/ Amiga Collections: Software of the Month Club / Amiga General Interest Volume 220 (1995)(SOMC)(Disk 2 of y)[SMCxxxC30Ix].zip / Amiga General Interest Volume 220 (1995)(SOMC)(Disk 2 of y)[SMCxxxC30Ix].adf / Typeface / Source / error.c < prev    next >
C/C++ Source or Header  |  1995-09-29  |  991b  |  53 lines

  1. /*****************/
  2. /*         */
  3. /* Error handing */
  4. /*         */
  5. /*****************/
  6.  
  7. #include "typeface.h"
  8.  
  9. void ErrorCode(ULONG code)
  10. {
  11.   ShowReq(GetString(msgFatalError),GetString(msgCancel),ErrorText(code));
  12.   Quit();
  13. }
  14.  
  15. char *ErrorText(ULONG code)
  16. {
  17.   switch (code)
  18.   {
  19.     case ASLALLOC:
  20.       return "AllocAslRequest()";
  21.       break;
  22.     case CREATEPORT:
  23.       return "CreateMsgPort()";
  24.       break;
  25.     case LOCKSCREEN:
  26.       return "LockPubScreen()";
  27.       break;
  28.     case OPENSCREEN:
  29.       return "OpenScreenTagList()";
  30.       break;
  31.     case ALLOCVEC:
  32.       return "AllocVec()";
  33.       break;
  34.     case NEWWINDOW:
  35.       return "BGUI_NewObject(WINDOW)";
  36.       break;
  37.     case NEWFILE:
  38.       return "BGUI_NewObject(FILEREQ)";
  39.       break;
  40.     case OPENWINDOW:
  41.       return "DoMethod(WM_OPEN)";
  42.       break;
  43.     case NEWPROP:
  44.       return "NewObject(PROPGCLASS)";
  45.       break;
  46.     case NEWBUTTON:
  47.       return "NewObject(BUTTONGCLASS)";
  48.       break;
  49.     default:
  50.       return "<Unknown>";
  51.   }
  52. }
  53.